package phase01.module2.code.question3;

public class Invoice {
    private int callTime = 0;
    private int dataUsed = 0;
    private double monthlyBill = 0.0;

    public void show() {
        System.out.println("通话时长：" + callTime);
        System.out.println("流量使用：" + dataUsed);
        System.out.println("本月资费：" + monthlyBill);
    }

    public int getCallTime() {
        return callTime;
    }

    public void setCallTime(int callTime) {
        this.callTime += callTime;
        final double CALL_PRICE = 0.15;
        this.monthlyBill += callTime * CALL_PRICE;
    }

    public int getDataUsed() {
        return dataUsed;
    }

    public void setDataUsed(int dataUsed) {
        this.dataUsed += dataUsed;
        final double DATA_PRICE = 0.0001;
        this.monthlyBill += dataUsed * DATA_PRICE;
    }

    public double getMonthlyBill() {
        return monthlyBill;
    }

    public void setMonthlyBill(double monthlyBill) {
        this.monthlyBill = monthlyBill;
    }
}
